﻿@using WarSpot.WebFace.Security
@model List<WarSpot.Cloud.Storage.Models.BlobFile>

@{
    ViewBag.Title = "Файлы";
}

@{
	var identity = (User.Identity as CustomIdentity);
}

	@if (identity != null && identity.IsInRole("admin"))
	{
    @Html.ActionLink("Загрузить файл", "Create")
  }
<div class="display-label">
	<table>
		<tr>
				<!-- rewrite this 
			<td></td>
        -->
      <td>Имя</td><td>Описание</td><td>Дата добавления</td>
		</tr>
		@foreach (var m in Model)
  {
			<tr>
				<!-- rewrite this 
     		<td>@Html.ActionLink("&dArr;", "Download", new { id = m.ID })</td>
        -->
				<td>@Html.ActionLink(m.Name, "Download", new { id = m.ID })</td>
				<td>@Html.ActionLink(m.Description, "Details", new { id = m.ID })</td>
        <td>@m.CreationTime</td>
			</tr>
			
  }
		
	</table>
</div>